package todo_plan

import (
	"github.com/robfig/cron/v3"
)

func PlanCronInit(c *cron.Cron) {
	view := NewPlanView()
	planTaskInit(c, view)
}
func planTaskInit(c *cron.Cron, view *PlanView) {
	//c.AddFunc("@every 5s", func() {
	//	fmt.Printf("定时任务1-Every five seconds, %s\n", time.Now().Format("15:04:05"))
	//})

	//c.AddFunc("*/1 * * * *", func() {
	//	fmt.Printf("Plan定时任务2-This task runs every minute. %s\n", time.Now().Format("15:04:05"))
	//})

	c.AddFunc("@every 60s", view.cronPlanInfoView)
}
